//
//  MySelfTableViewCell.m
//  Wechat
//
//  Created by FONERY on 2019/9/9.
//  Copyright © 2019 Zhangfan. All rights reserved.
//

#import "MySelfTableViewCell.h"
#import "MySelfModel.h"

@interface MySelfTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconImv;
@property (weak, nonatomic) IBOutlet UILabel *textLab;

@end

@implementation MySelfTableViewCell

+ (instancetype)cellWithTableView:(UITableView *)tableView {
    MySelfTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MySelfTableViewCellIdentifier"];
    if (cell == nil) {
        cell = [[[UINib nibWithNibName:@"MySelfTableViewCell" bundle:nil] instantiateWithOwner:nil options:nil] firstObject];
    }
    return cell;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (CGFloat)cellHeight {
    return 44;
}

- (void)setMySelfModel:(MySelfModel *)mySelfModel {
    _mySelfModel = mySelfModel;
    
    self.textLab.text = mySelfModel.title;
    self.iconImv.image = [UIImage imageNamed:mySelfModel.image];
}

@end
